#ifndef CHESSBOARD_H
#define CHESSBOARD_H
#include "Headers.h"
#include "Figure.h"
#include "Figure.h"
#include "Bishop.h"
#include "Queen.h"
#include "Rook.h"
#include "Knight.h"
#include "King.h"
#include "Pawn.h"
#include "Field.h"
#include "PossibleMoves.h"

class ChessBoard : public QObject
{
    Q_OBJECT
private:
    Field * fields[8][8];
public:
    ChessBoard();
    void init();
    void move(const QString & from, const QString & on);
    PossibleMoves getPossibleMovesFrom(const int y, const int x) const;
    Field * field(const int y, const int x) const;
    Field * field(const QString & pos) const;
    ~ChessBoard();

signals:
    void repaint();
};

#endif // CHESSBOARD_H
